//-----------------------------------------------------------------------------
// Bend2D - Physics Engine
// Roberto Bender <beto.bender@gmail.com>
// Description: 
// Date: 11/03/2010
//-----------------------------------------------------------------------------
#ifndef PHYSICABLE_H
#define PHYSICABLE_H

#include "acceleration.h"

#include <list>
using namespace std;

namespace bend2d
{
    class Physicable 
    {
        public:
            typedef list<Physicable*> PhysicableList;
            PhysicableList::iterator& GetPhysicableIterator();

            Physicable();
            Physicable(double mass, double elastic, double friction);
            void SetMass(double mass);
            void SetElastic(double elastic);
            void SetFriction(double friction);
            double GetMass() const;
            double GetElastic() const;
            double GetFriction() const;

            void ResetForces();
            void ApplyForce(const Acceleration& acceleration);
            const Acceleration& GetResultForces() const;

			virtual ~Physicable() {}

        private:
            PhysicableList::iterator m_Iterator;
            double m_Mass;
            double m_Elastic;
            double m_Friction;
            Acceleration m_ResultForce;
    };
}

#endif
